﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Basmus.Conel;
using Basmus.Resources;
using Basmus.Values;
using Basmus.Values.Attributive;
using Basmus.Values.Attributive.ReadWrite;
using Basmus.Values.Web;
using Ninject.Modules;

namespace ExampleWebApplication
{
    public class ExampleNinjectModule : NinjectModule
    {
        public override void Load()
        {
            Bind<IBinder>().To<DefaultBinder>();
            Bind<IVirtualPathService>().ToConstant(new StandartVirtualPathService(false, NamespaceMap.Map, true));
            Bind<IValuesService<object>>().To<ValuesService>();
            Bind<IValuesService<string>>().To<StringValuesService>();
            Bind<IPropertyInfoBuilder>().To<PropertyInfoBuilder>();
            Bind<IBindingBuilder>().To<BindingBuilder>();
            Bind<IObjectElementsReaderWriterBuilder>().To<BaseTypeObjectElementsReaderWriterBuilder>();
            Bind<IObjectElementsReaderWriterBuilder>().To<EnumObjectElementsReaderWriterBuilder>();
            Bind<IObjectElementsReaderWriterBuilder>().To<NullableObjectElementsReaderWriterBuilder>();
            Bind<IRouteInfoService>().To<RouteInfoService>();
            Bind<IContextService>().To<ContextService>();
            Bind<IGetterSetterBuilder>().To<PropertyInfoGetterSetterBuilder>();
            Bind<WebLinkService>().To<WebLinkService>().InSingletonScope();
        }
    }
}